<!--#
layout("/layouts/platform.html"){
#-->
<header class="header navbar bg-white shadow">
    <div class="btn-group tool-button">
        <a class="btn btn-primary navbar-btn" href="${base}/platform/member/account/money" id="goBack" data-pjax><i class="ti-angle-left"></i>${msg['globals.button.back']}</a>
    </div>
</header>

<div class="content-wrap">
    <div class="wrapper" style="min-height:500px;">
        <section class="panel panel-form">
            <form id="editForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
                  action="${base}/platform/member/account/money/editDo" method="post">
                <input name="id" type="hidden" value="${obj.id}">
                <div class="row mb10 mt10">
                    <div class="col-lg-12">
                        <div class="form-group">
                            <label for="accountId" class="col-sm-2 control-label">${msg['member.account.money.column.accountId']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="accountId" class="form-control" name="accountId" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.accountId']}" value="${obj.accountId}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="orderId" class="col-sm-2 control-label">${msg['member.account.money.column.orderId']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="orderId" class="form-control" name="orderId" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.orderId']}" value="${obj.orderId}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="trade_no" class="col-sm-2 control-label">${msg['member.account.money.column.trade_no']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="trade_no" class="form-control" name="trade_no" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.trade_no']}" value="${obj.trade_no}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="note" class="col-sm-2 control-label">${msg['member.account.money.column.note']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="note" class="form-control" name="note" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.note']}" value="${obj.note}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="oldMoney" class="col-sm-2 control-label">${msg['member.account.money.column.oldMoney']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="oldMoney" class="form-control" name="oldMoney" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.oldMoney']}" value="${obj.oldMoney}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="newMoney" class="col-sm-2 control-label">${msg['member.account.money.column.newMoney']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="newMoney" class="form-control" name="newMoney" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.newMoney']}" value="${obj.newMoney}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="diffMoney" class="col-sm-2 control-label">${msg['member.account.money.column.diffMoney']}</label>
                            <div class="col-sm-8">
                                <input type="text" id="diffMoney" class="form-control" name="diffMoney" data-parsley-required="true"
                                       placeholder="${msg['member.account.money.column.diffMoney']}" value="${obj.diffMoney}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="at" class="col-sm-2 control-label">${msg['member.account.money.column.creatAt']}</label>
                            <div class="col-sm-8 input-group date form_datetime "
                                 style="padding-left: 16px; padding-right: 16px;"
                                 data-date="1979-09-16T05:25:07Z"
                                 data-date-format="dd MM yyyy - HH:ii p" data-link-field="at">
                                <input type="text" size="16" readonly class="form-control"
                                       value="${@date.getDateTime()}" data-parsley-required="true">
                                <span class="input-group-addon"><span
                                        class="glyphicon glyphicon-remove"></span></span> <span
                                    class="input-group-addon"><span
                                    class="glyphicon glyphicon-th"></span></span>
                            </div>
                            <input type="hidden" id="at" name="at"
                                   value="${@date.getDateTime()}" />
                        </div>
                    </div>
                </div>
                <div class="col-lg-3"></div>
                <div class="col-lg-6">
                    <div class="form-group text-center">
                        <label></label>

                        <div>
                            <button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="${msg['globals.button.submit.tip']}">${msg['globals.button.submit']}</button>
                        </div>
                    </div>
                </div>
            </form>
        </section>

    </div>
</div>
<script language="JavaScript">
    $(document).ready(function () {
        $('.form_datetime').datetimepicker({
            format:'yyyy-mm-dd hh:ii:ss',
            weekStart: 1,
            todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            forceParse: 0,
            showMeridian: 1
        });
        $('#editForm').ajaxForm({
            dataType: 'json',
            beforeSubmit: function (arr, form, options) {
                form.find("button:submit").button("loading");
            },
            success: function (data, statusText, xhr, form) {
                if (data.code == 0) {
                    Toast.success(data.msg);
                    setTimeout(function () {
                        $("#goBack").trigger("click");
                    }, 1000);
                } else {
                    Toast.error(data.msg);
                }
                form.find("button:submit").button("reset");
            }
        });
    });
</script>
<!--#}#-->